package com.magina.antiPro.controller;//package com.magina.antiPro.controller;
//
//import com.alibaba.fastjson.JSON;
//import com.google.common.base.Preconditions;
//import com.google.common.collect.Lists;
//import com.magina.antiPro.config.ApiJsonObject;
//import com.magina.antiPro.config.ApiJsonProperty;
//import com.magina.antiPro.exception.BusinessException;
//import com.magina.antiPro.response.Response;
//
//import io.swagger.annotations.*;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.util.ObjectUtils;
//import org.springframework.util.StringUtils;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//import java.util.Map;
//
//
//
//@Slf4j
//@Api(value = "/mapDataController", description = "测试接受Map参数")
//@RestController("/mapDataController")
//public class MapDataController {
//
//
//    @ApiOperation(value = "测试接受Map参数",notes = "测试接受Map参数")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "map", value = "idList,oppId, 身份证", paramType = "body",defaultValue = "{\"planIdList\":[1,2,3],\"oppId\":1,\"custCode\":\"440106195108190327\"}")})
//    @PostMapping("/getDeclareAreaData")
//    public Response getDeclareAreaData(@RequestBody Map<String,Object> map) throws BusinessException {
//        log.info("========测试接受Map参数========");
//        Preconditions.checkArgument(!StringUtils.isEmpty(map.get("oppId").toString()), "商机id不能为空！");
//        Preconditions.checkArgument(!StringUtils.isEmpty(map.get("custCode").toString()), "身份证不能为空！");
////        Integer oppId = (Integer) map.get("oppId");
//        Integer oppId = Integer.valueOf(map.get("oppId").toString());//"oppId":"22"
////        String custCode = (String) map.get("custCode");
//        String custCode = map.get("custCode").toString();
//        List<String> idList = JSON.parseArray(JSON.toJSONString(map.get("planIdList")), String.class);
//        List<Integer> integerList = Lists.newArrayList();
//        idList.stream().forEach( p -> {
//            integerList.add((Integer.valueOf(p.trim())));
//        });
//        //"planIdList":["312","123","111"]
////        List<Integer> integerList = JSON.parseArray(JSON.toJSONString(map.get("planIdList")), Integer.class);
//        log.info("oppId------------"+oppId);
//        log.info("custCode------------"+custCode);
//        log.info("idlist------------"+integerList);
//        return Response.succeed(null, "查询成功！");
//    }
//
//
////    @ApiOperation(value = "管理员-预判是否存在",notes ="预判管理员是否存在" )
////    @ApiJsonObject(name = "manager-checkManager", value = {
////            @ApiJsonProperty(name = JSON_USER_NAME),
////            @ApiJsonProperty(name = JSON_USER_EMAIL)},
////            result = @ApiJsonResult({}))
////    @ApiImplicitParam(name = "params", required = true, dataType = "manager-checkManager")
////    @ApiResponses({@ApiResponse(code = 200, message = "OK", reference = "manager-checkManager")})
////
////    @PostMapping(value = "/checkManager")
////    public String checkManager(@RequestBody String params) {
////        return "success";
////    }
//
//    @ApiOperation(value = "Login", tags = "login")
//    @PutMapping
//    public Response auth(@ApiJsonObject(name = "login_model", value = {
//            @ApiJsonProperty(key = "mobile", example = "18614242538", description = "user mobile"),
//            @ApiJsonProperty(key = "password", example = "123456", description = "user password")
//    })
//                     @RequestBody Map<String, String> params) {
//        return Response.succeed("success");
//    }
//
//}
